<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/4/19
 * Time: 10:17
 */
namespace app\admin\model;

use think\Model;

class BusinessMobel extends Model
{
    // 确定链接表名
    protected $name = 'member';
    
    //  客户信息录入
    public function getBusinAdd ($param)
    {
        try{
            $result = $this->validate('MemberValidate')->save($param);
            if(false === $result){
                // 验证失败 输出错误信息
                return msg(-1, '', $this->getError());
            }else{

                return msg(1, url('business/trackMem'), '添加成功');
            }
        }catch(\Exception $e){
            return msg(-2, '', $e->getMessage());
        }
    }
}